package beans.autowire;

import beans.factory.User;
import cn.stimd.spring.beans.factory.annotation.Autowired;

/**
 * Created by Stimd
 * 项目地址：https://gitee.com/stimd/spring-wheel
 * 公众号：Java编程探微
 */
public class AutowireBean {
    User user;

    public AutowireBean() {}

    @Autowired
    public AutowireBean(User user) {
        this.user = user;
    }


    @MyBean
    public UserController userController(UserService userService) {
        UserController userController = new UserController();
        userController.setUserService(userService);
        return userController;
    }
}
